Palkia and Dialga are both legendary Pokemon, so they are going to be quite hard to catch and find!
The first thing that you have to do is complete the story side of the game, otherwise it is not possible to catch these Pokemon.
Travel to Celestia town and you should be able to find Cynthia's Grandma, she will read to you about the legendary Pokemon before you can go any further.
Next you have to make sure that you have both the Lustrous orb and the Adamant orb. You should already have them from your travels in the story, but if you don't these can be found in Mt Coronet in a chamber that is hidden on top of a waterfall.
Take these to the top of the mountain. From the spear pillar at the top, a blue light should appear. From this blue light will come Dialga. Make sure to save the game before you engage Dialga in battle so that if you fail to catch it then you can turn off the game and try again. Make sure the Pokemon has lost as much life as possible before you try throwing a ball at it.
You have to leave the mountain for a while, but when you get back the blue light will have turned pink and from this the Palkia should appear. Follow the same method as above the catch the Palkia.
These are surprisingly not the hardest legendary Pokemon to catch, just make sure that you have some good Pokemon with you and that you reduce the legendary Pokemon's health until the bar turns red. It also helps if you put them to sleep.