These two boards run on very low power. But power interruption for raspberry pi may cause damage to the software and applications . In case of Arduino if there is any power cut it again restarts. So raspberry pi must be properly shutdown before disconnecting power.Arduino does not have any operating system. Its firmware simple interprets the code written to it. It is very easy to execute simple code.Raspberry pi comes with fully functional operating system called Raspbian. It has all features of a computer with a processor, memory and graphic driver. Pi can use different operating systems. Although Linux is preferred android can also be installed .
Input and output pins allows these boards to connect to other devices. Raspberry pi2 has 2 packs of input/output pins while Arduino uno has 20 pins.
Pi is faster than Arduino by 40 times in clock speed.Pi has ram 128000 times more than Arduino.So Raspberry pi is more powerful than Arduino.
Arduino has 32kb of storage on board.This is used for storing the code.This code is decides the functions of the Arduino.Raspberry pi doesnot have any onboard storage.But is provides micro SD port.
Arduino can be expanded using external hardware like Wi-Fi ,Ethernet, touchscreens ,cameras etc. These boards are called shields. These shields are easily installed for Arduino. While raspberry is self-constrained board.Pi can also add some hats to add hardware like Touch screen, GPS,RGB panels etc. but does not have many options like Arduino.
Arduino use Arduino IDE for developing the code. While Raspbeery pi can use Scratch ,IDLE anything that supports Linux.
So to decide between the two ,first you should know what you want to do in your project.
From above discussion we can understand that Arduino is good for repetitive tasks such as opening the garage door ,switching the lights on and off.
While pi good for performing multiple tasks, driving complicated robots.
For example if you want to monitor the soil moisture and mail me if it is necessary to water the plants.Then Arduino can be used.
But if it you want to monitor the moisture ,mail me when they plants need to be watered and check the weather report from online .If there is rain do nothing. For this application Raspberry pi required.
In simple Arduino is used for beginners projects and some complicated projects can be easily handled by pi.