Both seem grammatically correct to me, but have small differences in meaning. The first sentence I would separate like so:
my school needs better [facilities for carrying out scientific experiments]
Thus, the school has facilities, and those facilities have the purpose of carrying out scientific experiments, but better facilities are needed (for an unspecified reason).
The second sentence instead reads a bit differently, with some implied words:
my school needs better facilities (in order) to carry out scientific experiments
The meaning here is that the school has facilities, but those facilities would need to be improved before scientific experiments could be carried out.
In both cases the school already has facilities, but the first sentence states that specifically the facilities already used for experiments need improvements, while the second states that the existing facilities must be improved before experiments can take place.