Monocrystalline silicon solar cells produce a voltage when visible light and infrared light (above a critical frequency) are absorbed. Your batteries will be charged more efficiently outside as it is much cooler.
The infrared radiation from a hot greenhouse is far too low in energy to produce a voltage from a solar cell, it must come directly from the Sun.