I was using whatsapp on my iphone, then I deleted the application without deactivating the account or something, now if I put the SIM card on another mobile and install the Whatsapp application on it, the chat histories and photos shared before will appear on the other phone too ?
Simply the answer would be NO.
According to Whatsapp FAQ, Your WhatsApp chat history is not stored on their servers
But, There are certain things you can do to save your chat history.
Make back-ups of your WhatsApp conversations
If your WhatsApp conversations are important to you, it's a good idea to make backups of them so you don't lose them if there's a problem with the app. To do this, go to the Settings menu, choose 'Chat preferences' then click on the Chat history backup option.
Chat preferences (click image for larger variant)
Email the conversations
You can send an entire conversation history from WhatsApp via email. In Android, click on the Menu option in a conversation (it's on the bottom-right of the screen), go to 'More' and select 'Email Conversation', before entering the address of the recipient. WhatsApp will create an email with the whole text conversation, including any pictures, voice or video clips.