It depends a bit on what you're specifically trying to do.
If you want to change all of the pixels to a single new color, then most likely the fastest & easiest way is something like this:
int width = 512;
int height = 512;
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D g2d = image.createGraphics();
Color darkOliveGreen = new Color(85, 107, 47);
g2d.fillRect(0, 0, image.getWidth(), image.getHeight());
Note, the above code can also be modified to deal with rectangular subsections of the image.
On the other hand, if you need to quickly evaluate & process the pixels individually for some reason (i.e. change the reds to greens, the greens to blues & the blues to reds), then you'll need to manually access the data buffer that backs the image:
byte pixels = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();
From there you can manipulate the pixels quickly without the overhead of issuing a method call for each read & write. The downsides to this approach are: