I'm not sure how Shikamaru's abilities are effected, but since his clan has used these techniques for many years I would bet that they have a way to use their abilities at night or they would have been wiped out.
Deva Pein has only to see Shikamaru and it's over, the only possible way I can see Shikamaru winning is if he were to come out of the dark and one shot Deva, or laying a trap and hoping for Pein to fall for it...
If Pein knew Shikamaru was there at any time he could fly up and crush an area the size of the leaf village, sorry Shika but you're not that fast.