How to model repeated measures I am interested in knowing how different climate variables affect the abundance in bees in two different habitats (meadows and buildings). I had 10 transects in meadows areas and 10 in buildings areas. I walked each transect 15 times. 
Response variable: Abundance
Fixed factors: Air temperature, Sunshine
Random factors: Transect nested in habitat, times (1 to 15)
For example, using R, I fitted this model:
library (lme4)
model <- glmer(Abundance ~ Airtemp * Sunshine + (1|Habitat/transect) + (1|Times),
               family = poisson, data = bees)

Is this a good way to address my research question ?
 A: The key concept with repeated measures is that there is clustering. This is why mixed effects models are often used for repeated measures - because they specifically handle clustered data. These models take account of non-independence of data within each cluster. ie, observations in one cluster will be more similar to each other than to observations in another cluster.
To fit a mixed effects model for repeated measures, you need to specify the grouping variable (that is, what defines the cluster), and fit random intercepts for it. In your case you have observations nested in transects which are in turn nested within habitat. However you only have 2 habitats, therefore it is not a good idea to specify this as a random effect. You can specify it as a fixed effect instead.
If you also specify Times as a random intercept, you are saying that observations are also nested within each occasion of measurement. This may or may not be appropriate. If there is some reason that observations on different transects at the same measurement occasion should be more alike one another than observations on the same transects but at a different time, and you are not interested in fixed effect of measurement occasion, then you can include this term as a random effect in the model. 
So, the key point is that in your case you need to fit a model with transect as a random intercept. In R, a better starting model is:
glmer(Abundance ~ Airtemp * Sunshine + Habitat + (1|transect) + (1|Times),
           family = poisson, data = bees)

