Depends. Some kinds of peas are fine, and some are toxic to horses. Indian peas, sweet peas, ever-lasing peas, wild winter peas and cow peas are all toxic (as are many kinds of beans - any bean that needs to be cooked for a long time to be palatable for humans is, well, no more palatable to horses unless cooked for a long time).
However, other peas such as green peas, split peas or field peas are not just okay for horses, but are actually considered a good feed for youngstock in Europe (they aren't fed as much in the US). They have a good amount of protein to support the rapid growth of yearlings.