To begin, I am aware that at some point in time Dumbledore borrowed the cloak from James Potter. If James Potter either had possession of the cloak at the time, or knew that he could get it back from Dumbledore - why not use the cloak to hide his family, or at least Harry, from Voldemort?
The Potters did not have the cloak at the time of the attack.
Dumbledore explicitly said in Philosopher's Stone that James left the cloak in his possession "Before he died". Here is an excellent article that discusses the issue.
So, the question becomes "Why did James leave his invisibility cloak with Dumbledore?" Most likely because Dumbledore was actively researching the Hallows at the time, and suspected that the cloak was one of them. After all, if the Potters are in hiding behind the impregnable Fidelius Charm, they would have no need for the cloak, making this the ideal time for Dumbledore to borrow it for study.
So, why use the Fidelius charm rather than the cloak?
The cloak is a tactical asset, not a strategic one
Because it's much, much more effective, and because Dumbledore advised them thus.
The cloak isn't perfect; we know that Mad-Eye Moody's magical eye was able to see straight through it, there's no telling what other spells or powers Voldemort had access to which could penetrate the cloak just as well. The Fidelius Charm, on the other hand, has displayed no such weakness.
The cloak isn't big - it could cover three children, just about, but the older the children got in the books the harder it was to cover them all. It was, after all, designed to hide one person, not three. The Fidelius Charm we know is capable of hiding entire buildings.
The cloak doesn't make you inaudible - if you've ever tried to deal with a fussing baby, you'll know that the chances of baby Harry staying quiet the whole time they needed to hide were below zero.
The cloak doesn't make you immaterial or invulnerable. I may not be able to see you, but so what? If I can hear that you're in the room, all I need to do is set fire to the place, or collapse the roof, or just fling killing curses all over the place over and over.
The cloak is great for immediate use, for hiding from your enemies for a while, but it's not something you could rely upon to hide a whole family for more than a couple of minutes.
Peter Pettigrew was James' Keeper and implicitly trustworthy. Therefore when Peter turned up on that fateful day, there was no need to rush for the cloak. James and Lily had no reason to expect and prepare for the attack, leaving them only with their wits and their wands with which to defend themselves.
'Harry,' said Lupin hurriedly, 'don't you see? All this time we've thought Sirius betrayed your parents, and Peter tracked him down - but it was the other way around, don't you see? Peter betrayed your mother and father - Sirius tracked Peter down -'
'THAT'S NOT TRUE!" Harry yelled. 'HE WAS THEIR SECRET KEEPER! HE SAID SO BEFORE YOU TURNED UP, HE SAID HE KILLED THEM!'
He was pointing back at Black, who shook his head slowly; the sunken eyes were suddenly over-bright.
'Harry ... I as good as killed them,' he croaked. 'I persuaded Lily and James to change to Peter at the last moment, persuaded them to use him as Secret Keeper instead of me ... I'm to blame, I know it ... the night they died, I'd arranged to check on Peter, make sure he was still safe, but when I arrived at his hiding place, he'd gone. Yet there was not sign of a struggle. It didn't feel right. I was scared. I set out for your parents' house straight away. And when I saw their house, destroyed, and their bodies - I realised what Peter must have done. What' I'd done.
PoA - Chapter 19 - Servant of Voldemort
Reading more of this chapter unravels more of Pettigrew's treachery, but it's implicit that Pettigrew was within the Potter family circle of trust.
The Cloak of Invisibility was never used (mentioned) during the attack. Voldemort was only repelled by Lily's magical defense.
The cloak, as I understand it, is not designed for permanent hiding. It is for sneaking past death (and everyone else) unseen. The Potters had gone into hiding to protect themselves from Voldemort. It would not have been considered necessary for them to use the cloak, because they thought their secret location was safe. If James had been in possession of the cloak on the night that Voldemort attacked, he might have been able to hide his wife and child under it, but I doubt all three of them would have fit under it. As it is, had the cloak been with them, it might have ended up in Voldemort's possession.
My best guess for why James Potter didn't use the invisibility cloak to protect his family during Voldemort's attack is that it would have been a futile effort. I specifically remember a moment in the book where Dumbledore and Harry Potter are speaking of the time when Harry was in the room with the mirror that allowed him to see his family (or rather what he most desired at the time). What's important about this conversation is that Dumbledore confesses that he could see through the invisibility cloak, because his power was too great for it to stop him. Therefore, I suspect that Voldemort, being a very powerful wizard, would also have that same power/ability; rendering the invisibility cloak useless in protecting Harry's family against Voldemort's attack.
Tldr: Dumbledore can see through the cloak so Voldemort probably can too.
Disclaimer: I am in no way well versed in the books, but I have read them. I also wont be fact checking or quoting so take what I say with a grain of salt per-say. Let me know if I'm wrong and/or misinformed on anything; I always enjoy learning new things.
Like what others said, I personally think if I could still have the time of thinking for an invisibility cloak, hereby stated that the scenarios are too conflict.
Since they did not expect the attack of Voldemort, they would just think of,
what do we do now?
And I am confidently sure that James already knew that Voldemort is a great sorcerer! He is a dark wizard, a very wise Tom Riddle. Voldemort would not ascend the stairs without knowing that the Potters are there, he would surely doubt if they have used some kind of magic, and there are lot of spells to detach the cloak from them. Tom Riddle would not go there unless if he is wandless
One more reason, that is the way Lily wanted to draw the whole story. Without that dark tragedy, THE WHOLE STORY PLOT WOULD BE WRECKED. What do I mean? Accept the fact, that Lily was the one who defended Harry and do some kind of enchantments, making the story more unpredictable and leading its way to the 7th book. Without that scenario, there could be no reason for Harry to beat every challenges he faced at Hogwarts, he could be even dead.