I watched a film not longer than 7 years ago. I remember that there was thunder and on the next(?) day enormous robots came out of Earth (they were underground). Later the main character discovered how did the robots got underground - through the lightning. When a lightning bolt struck the robot somehow using the lightning traveled through it (or was in the lightning, I'm not sure) and that way he was not more than 5m underground. The main character was a man with dark hair. I think he had a brown leather jacket though that just might be my imagination. I think the robots were all over the world (i.e. there was thunder everywhere and they were underground all over the world). The robots were making loud noises (lasted about 5s) from time to time.
I remember that the first robot came from underneath the road in the main character's city. People started panicking and running away. I think he told his wife to leave and took only his kid(?).
There was also a scene in which he went (he had a car and drove there) to a yellow big house which was the main character's mother's(?) house. I think his wife was meant to be there. He took some food from the fridge and left.
The next scene I remember is when the main character was running away with his daughter(?) (not from a specific robot, running like from the place where the robot was) and found an old house on a small hill(?). The owner let them inside. He allowed them to stay in the basement. The main character put the daughter to sleep. They woke up in the night hearing a robot (making that loud noise). The robot had some kind of a "hand" which was more like a extendable metal pipe with an eye or some kind of sensor and a light(?) at the end. The robot thoroughly searched the basement with that "hand". He didn't see the main character though and left.
The next scene I remember, which might have been the next one in the film, was the main character with his daughter trying to enter a ship. There was a lot of people there and not all of them managed to get in. Here my memory gets a little blurry. I think the main character managed to get on the ship but I also kind of remember a robot appearing behind a hill to which the ship was going and possibly the people panicking.
After that I only remember the kind of final scene. The main character noticed that the birds can freely fly around a robot (which they previously couldn't as he had some kind of a shield). There were some military and explained (or told to shoot, not sure) the situation to one of the soldiers. They started shooting and the robot fell down. I think they took out a dead or almost dead alien from it (he controlled the robot). All the robots were killed after that.
I just remembered a scene though the memory is blurry and I'm not sure whether it's from that film. I think someone was taken by the robot and inside there were I think 2 cages looking like a ball made of metal bars. The person was somehow rescued.