The life of a battery designed for solar lights is about 2 years. Check the dates of purchase as this may be where the problem is. Replace the batteries if they're older than 2 years.
The lights' placement is very important to the performance of the solar lights. The solar panels should receive the maximum amount of sun exposure. This may require that the lights are moved or rotated.
Any garden light will get dirty sitting outside all day. Dust, dirt and residue can form on the solar panels, which will in turn block sunlight from getting to the solar cells. Wipe the solar panels with a dampened cloth for the best performance.